package com.example.qihuibao.dao

import androidx.room.*
import com.example.qihuibao.bean.Department
import com.example.qihuibao.bean.RspQueryDepartmentInfoBean

@Dao
interface DepartmentInfoDao {
//    @Query("SELECT * FROM DepartmentInfo WHERE phone IN (:field_phone)")
//    fun queryInPhone(field_phone: String): List<UserInfo>?

//    @Insert(onConflict = OnConflictStrategy.REPLACE)
//    fun save(bean: RspQueryDepartmentInfoBean) : Long

//    @Insert
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun saveList(users: List<Department>) : List<Long>?

    @Query("SELECT * FROM DepartmentInfo")
    fun queryAll(): List<Department>?
//
//    @Delete
//    fun delete(userInfo: UserInfo)
//
    @Query("DELETE FROM DepartmentInfo")
    fun deleteAll()
}